package com.company.modules.project.util;

/**
 * @author : Real
 * @date : 2022/2/9 8:52
 * @description : 生成 Redis 的 Key 值
 */
public class RedisKeyUtil {

    public static final String SPLIT = ":";

    private static final String PREFIX_FORGET_PASSWORD = "forget:password:verify";

    private static final String PREFIX_KAPTCHA = "kaptcha";

    /**
     * 生成验证码的 Key 值
     *
     * @param email 邮箱号
     * @return Key 值
     */
    public static String getForgetPasswordVerifyKey(String email) {
        return PREFIX_FORGET_PASSWORD + SPLIT + email;
    }

    public static String getKaptchaKey(String owner) {
        return PREFIX_KAPTCHA + SPLIT + owner;
    }

}
